package com.gqz.equip.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.equip.api.TBizcEneryEquipApi;
import com.gqz.equip.service.ITBizcEneryEquipService;
import com.gqz.equip.vo.TBizcEneryEquipVo;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 新能源设备信息 Controller
 *
 * @Version 1.0
 * @Author input you name
 */
@RestController
public class TBizcEneryEquipController implements TBizcEneryEquipApi {

    @Autowired
    private ITBizcEneryEquipService service;

    @Override
    public R<List<TBizcEneryEquipVo>> getById(String id) {
        return R.ok(service.getById(id));
    }

    @Override
    public R<Page<TBizcEneryEquipVo>> page(@Valid RequestForm<TBizcEneryEquipVo> requestForm) {
        return R.ok(service.page(requestForm));
    }

    @Override
    public R<Long> count(@Valid RequestForm<TBizcEneryEquipVo> requestForm) {
        return R.ok(service.count(requestForm));
    }

    @Override
    public R<Integer> insert(List<TBizcEneryEquipVo> vos) {
        return R.ok(service.insert(vos));
    }

    @Override
    public R<Integer> update(List<TBizcEneryEquipVo> vos) {
        return R.ok(service.update(vos));
    }

    @Override
    public R<List<TBizcEneryEquipVo>> getList(@Valid RequestForm<TBizcEneryEquipVo> requestForm) {
        return R.ok(service.getList(requestForm));
    }

}
